// 投递
const mongoose = require('mongoose')
const DeliversSchema = new mongoose.Schema({
    // 用户id
    user_id: {
        type: String,
        required: true
        // type: mongoose.Schema.Types.ObjectId,
        // ref: 'Users',
        // required: true
    },
    // 简历id
    resumes_id: {
        type: String,
        required: true
        // type: mongoose.Schema.Types.ObjectId,
        // ref: 'Resumes',
        // required: true
    },
    // 职位
    positions: {
        type: mongoose.Schema.Types.ObjectId,
        ref: 'Positions',
        required: true
    },
    // 投递的状态
    status: {
        type: String,
        default: 0
    }
    //岗位投递数
    // deliverCount: {
    //     type: Number,
    //     required: true,
    //     default: 0
    // },
    // mongoose默认产生的字段，不需要展示
}, { timestamps: true })
module.exports = mongoose.model('delivers', DeliversSchema)
